<?php

class ControllerPlugin_Param extends Zend_Controller_Plugin_Abstract {	
	const NAME = 'ControllerPlugin_Param';
	/**
	 * validate the current user's request
	 * @param  Zend_Controller_Request_Abstract $request
     * @return void
	 */
	public function preDispatch(Zend_Controller_Request_Abstract $request) {
		
		$url = $request->getBaseUrl();
		$baseUrl = (basename($url)=='index.php')?dirname($url):$url;		
		Zend_Registry::set('baseUrl',$baseUrl);				
		
		$pageInfo = new Object_PageInfo();
		$pageInfo->init($request->getParams(),$baseUrl);		
		Zend_Registry::set('pageInfo',$pageInfo);

			
	}
}
